var VictorGift={

}
/**;
 * 优惠券显示 使用前提：页面引用了 coupon.tag 模板
 */
VictorGift.ticket=function(g){
    var html =  TicketTemplate['itemTemplate'+g.catalogId];

    var rmbText = "";
    if(g.discountWayId==1||g.discountWayId==2){////现金券 满减券显示现金符号
        rmbText="￥";
    }
    html = html.replace('^isRmb^',rmbText);
    html = html.replace('^moneyOff^',g.moneyOff);
    html = html.replace('^name^',g.name);
    html = html.replace('^intro^',g.intro);
    html = html.replace('^discountWayName^',g.discountWayName);
    html = html.replace('^catalogName^',g.catalogName);

    var indateText = "无期限";
    if(g.isIndate=='y'){//有效期
        var s = g.indateStart;
        s=s==''?'1970-01-01':s;
        var e = g.indateEnd;
        e=e==''?'1970-01-01':e;
        indateText=s+"至"+e;
    }
    html = html.replace('^indate^',indateText);
    return html;
};
/**
 * 积分显示 使用前提：页面引用了 score.tag 模板
 */
VictorGift.score=function(g){
    var html = ScoreTemplate.itemTemplate;
    ScoreTemplate.newCount();
    html = html.replace('id="scoretItem"','id="scoretItem"'+ScoreTemplate.count+'');
    html = html.replace('^score^',g.score);
    return html;
};